#!/bin/sh
echo 2 > /sys/class/net/enp130s0f1/device/sriov_numvfs
echo 0000:82:01.2 > /sys/bus/pci/drivers/mlx5_core/unbind
echo 0000:82:01.3 > /sys/bus/pci/drivers/mlx5_core/unbind
devlink dev eswitch set pci/0000:82:00.1 mode switchdev
echo 0000:82:01.3 > /sys/bus/pci/drivers/mlx5_core/bind
echo 0000:82:01.2 > /sys/bus/pci/drivers/mlx5_core/bind
ifconfig enp130s0f1 up
ifconfig enp130s0f1v0 up
ifconfig enp130s0f1v1 up
ethtool -K enp130s0f1 hw-tc-offload on
ethtool -K enp130s0f1v0 hw-tc-offload on
ethtool -K enp130s0f1v1 hw-tc-offload on

